package com.antu.first.dao;

import com.antu.first.bean.Room;
import com.antu.first.util.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 对房间进行操作
 * Created by Administrator on 2018/3/3.
 */
public interface RoomDao {

    /**
     * 新增房间信息
     * @param room
     * @return
     */
    int insertRoom(Room room);

    /**
     * 按酒店ID和房间类型查询所有的房间 分页
     * @param
     * @return
     */
    List<Room> selectRoomsByHotelIdAndRoomTypeIdPaging(@Param("room") Room room, @Param("pageBean")PageBean pageBean);
   // 按酒店ID和房间类型查询所有的房间
    int selectRoomsByHotelIdAndRoomTypeIdCount(@Param("room") Room room);

    /**
     * 根据酒店Id获取酒店的所有房间信息
     * @param hId
     * @return
     */
    List<Room> selectRoomsByHotelId(@Param("id") int hId);

    /**
     * 按照酒店ID更新酒店房间信息
     * @param room
     * @return
     */
    int updateRoomInfoByHoteId(Room room);

    /**
     * 按照酒店id新增房间
     * @param room
     * @return
     */
    int addRoomByHotelId(Room room);

    /**
     * 按照ID删除
     * @param room
     * @return
     */
    int deleteRoomByIdHotelId(Room room);
}
